<?php
    $value = pc_variable("value");
    if($value !== null) { 
        $image = pc_image($value->get("file"), 0, 64);
        $type = $value->getType();
        ?>
        <a href="<?php pc_echo(pc_link("Find", array("typeName" => $type->getFullName(), "id" => $value->getId()))); ?>" title="<?php pc_echo($value->get("name")); ?>">
            <img width="<?php pc_echo($image->getWidth()); ?>" height="<?php pc_echo($image->getHeight()); ?>" src="<?php pc_echo($image->getContextLocation()); ?>" alt="<?php pc_echo($value->get("name")); ?>" />
        </a>
<?php }